package com.bjpowernode.springboot.web;

import com.bjpowernode.springboot.config.Abc;
import com.bjpowernode.springboot.config.School;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @DATE 2021--11--27 23:25
 */
@Controller
public class IndexController {
    //注入数据
    @Autowired
    private School school;

    @Autowired
    private Abc abc;

    @RequestMapping(value = "/say")
    public @ResponseBody String say(){
        return "school.name="+school.getName()+"-----school.websit="+school.getWebsit()+"----"+abc.getName()+"----"+abc.getWebsit();
    }
}
